package com.zpz.framework.zpzoauth.common.result;

/**
 * @author zhangpanzhi
 * @time 2019-07-09
 * @description 未经本人允许请勿随便改动，尊重劳动
 * */
public enum ZpzOauthResultStatus {

    OK(0, "OK"),//通用成功
    DATA_IS_BLANK(1, "查询数据为空"),
    DIY_ERROR__1010(-1010, "自定义异常"),
    EXCEPTION(-1, "系统繁忙,请稍等"),//通用系统异常
    USER_INFO_BY_USER_NAME_30001(30001, "查询无此用户"),
    USER_MOBILE_NOT_NULL_30002(30002, "手机号不能为空"),
    USER_PASSWORD_NOT_NULL_30003(30003, "密码不能为空"),
    USER_VALID_CODE_NOT_NULL_30004(30004, "验证码不能为空"),
    USER_VALID_CODE_ERROR_30005(30005, "验证码无效"),
    USER_MOBILE_FORMAT_ERROR_30006(30006, "手机号格式错误"),
    USER_PASSWORD_FORMAT_ERROR_30007(30007, "密码格式错误"),
    USER_MOBILE_EXIST_ERROR_30008(30008, "此手机号已经存在"),
    USER_PWD_FAIL_30009(30009, "密码修改失败"),
    USER_PASSWORD_NOT_NULL_30010(30010, "确认密码不能为空"),
    USER_PASSWORD_NOT_NULL_30011(30011, "两次输入的密码不一致"),
    ROLE_INFO_SELETE_FAILED_38012(38012, "获取当前角色信息失败"),
    ROLE_CUR_SELETE_ISNULL_38013(38013, "该用户未设置角色信息"),
    ROLE_MENU_SELECT_FAILED_38015(38015, "获取当前登录用户菜单角色失败"),
    USER_NAME_NOT_NULL_30017(30017, "账号生成失败"),
    USER_MOBILE_EXIST_ERROR_30018(30018, "用户名已经存在"),
    MEMBER_CODE_NOT_NULL_30037(30037, "该账号被锁定"),
    USER_NAME_NOT_NULL_30025(30025, "此用户查无信息"),
    USER_PASSWORD_VALIDCOD_CHECK_EXPIRE_30041(30041, "修改密码验证码过期"),
    USER_ERROR_30048(30048, "用户密码已经锁定"),
    ROLE_NAME_NOT_NULL_38000(38000, "角色名称不能为空"),
    ROLE_NAME_EXIST_38001(38001, "该角色名称已存在"),
    ROLE_ADD_FAILED_38003(38003, "角色添加失败"),
    ROLE_UPDATE_FAILED_38004(38004, "角色更新失败"),
    ROLE_CODE_STATUS_NOT_NULL_38006(38006, "角色状态不能为空"),
    ROLE_CODE_STATUS_INVAILD_38007(38007, "角色状态不合法"),
    ROLE_CODE_NOT_NULL_38008(38008, "角色代码不能为空"),
    ROLE_CODE_NOT_NULL_38002(38002, "角色编码不能为空"),
    ROLE_MENU_SAVE_FAILED_38014(38014, "角色权限设置失败"),
    ROLE_INFO_DELETE_FAILED_38009(38009, "角色信息删除失败"),
    ROLE_INFO_DELETE_FAILED_38016(38016, "该角色已绑定用户，无法删除"),
    ROLE_STATE_UPDATE_FAILED_38011(38011, "角色状态修改失败"),
    ROLE_CODE_INFO_FAILED_38010(38010, "获取角色信息失败"),
    MEMBER_ID_NOT_AVAILABLE_30033(30033, "成员id不可用"),
    UPDATE_USER_ERROR_30035(30035, "修改成员信息失败"),
    DEL_USER_ERROR_30034(30034, "删除成员失败"),
    ADD_USER_ERROR_30029(30029, "添加成员失败"),
    USER_ROLE_NOT_NULL_30027(30027, "用户角色不能为空"),
    MEMBER_CODE_NOT_NULL_30036(30036, "成员id不能为空"),
    USER_NAME_ERROR_30028(30028, "姓名无效"),
    USER_NAME_NOT_NULL_30013(30013, "姓名不能为空"),
    STATUS_IS_ERROR_30049(30049, "状态值传入错误，请确认"),
    ADD_ACCESS_ERROR_31000(31000, "添加权限失败"),
    ADD_ACCESS_EXISTCODE_31001(31001, "该权限编码已存在，请确认"),
    DEL_ACCESS_FAILURE_31002(31002, "权限删除失败"),
    ACCESS_NULL_31003(31003, "该权限信息不存在"),
    UPDATE_ACCESS_FAILURE_31004(31004, "权限信息修改失败"),
    USER_PASSWORD_OLDPWD_FAILURE_31005(31005, "旧密码验证失败"),
    USER_PHONE_FAILURE_31006(31006, "手机号码修改失败"),
    USER_NOT_CLIENT_800017(800017, "该用户无该客户端关系，请确认"),
    VERIFICATION_FAILURE_800019(800019, "参数校验失败"),
    GROUP_NAME_NOT_NULL_31990(31990,"数据权限组名称不能为空"),
    GROUP_ADD_FAILED_31991(31991,"数据权限组添加失败"),
    GROUP_CODE_NOT_NULL_31992(31992,"数据权限组编码不能为空"),
    GROUP_ADD_FAILED_31993(31993,"数据权限组修改失败"),
    GROUP_CODE_IS_EXSIT_31994(31994,"数据组编码已存在,请重新输入"),
    UPDATE_DATAACCESS_FAILURE_31040(31040, "数据权限信息修改失败"),
    DELETE_DATAACCESS_FAILURE_31041(31041, "数据权限信息删除失败"),
    UPDATE_DATAACCESS_FAILURE_31042(31042, "获取数据权限信息失败"),
    SELECT_MENU_FAILURE_31050(31050, "获取菜单信息失败"),
    ADD_MENU_FAILURE_31051(31051, "添加菜单信息失败"),
    UPDATE_MENU_FAILURE_31052(31052, "修改菜单信息失败"),
    DELETE_MENU_FAILURE_31053(31053, "删除菜单信息失败"),
    CLIENTID_NULL_31054(31054, "客户端ID不能为空"),
    USER_ISFIRST_LOGIN_31055(31055, "本次操作非首次登录"),
    //通用响应码格式不正确
    CODE_FORM_ERROR(-2, "响应码格式不正确"),
    LOGOUT_FAIL(10013, "退出登录失败"),
    OAUTH_10000(10000, "根据用户登录名查询无此用户"),
    OAUTH_10001(10001, "根据用户手机号查询无此用户"),
    OAUTH_10002(10002, "用户未设置密码"),
    OAUTH_10003(10003, "头部Authorization信息解析失败，请核实是否正确"),
    OAUTH_10004(10004, "请求头Authorization信息中携带了无效的客户端信息"),
    OAUTH_10005(10005, "账号或密码错误"),
    OAUTH_10006(10006, "手机号还未注册，请先注册再登录"),
    OAUTH_10007(10007, "验证码错误或者过期，请输入正确有效的验证码"),
    OAUTH_10008(10008, "您无权访问该系统"),
    OAUTH_10009(10009, "您的账号已被锁定"),
    OAUTH_10010(10010, "您访问该系统的权限已被冻结"),
    OAUTH_10014(10014, "用户密码已经锁定"),
    OAUTH_10013(10013, "账号或密码错误"),
    OAUTH_10015(10015, "one click login fail"),
    OAUTH_10016(10016, "该账号不存在"),
    OAUTH_10017(10017, "该账号没有权限"),


    ED_KEY_INVALID(10005, "无效的数据秘钥"),
    SIGN_KEY_INVALID(10006, "无效的签名秘钥"),
    GATE_WAY_10010(10010,"网关服务异常"),
    GATE_WAY_10011(10011,"获取服务接口安全规则异常"),
    GATE_WAY_10012(10012,"账号或密码错误"),
    GATE_WAY_10013(10013,"请求参数格式错误"),
    GATE_WAY_10014(10014,"请求参数体中加密数据不能为空"),
    GATE_WAY_10015(10015,"请求参数体中随机字符串不能为空"),
    GATE_WAY_10016(10016,"请求头中签名参数不能为空"),
    GATE_WAY_10017(10017,"非法请求，验签不通过"),
    GATE_WAY_10018(10018,"非法请求，加密数据无效"),
    GATE_WAY_10019(10019,"数据加密处理失败"),
    GATE_WAY_10020(10020,"业务服务响应数据获取失败"),
    GATE_WAY_10021(10021,"业务服务响应数据签名失败"),
    GATE_WAY_10023(10023,"LICENSE无效，不能为空"),
    GATE_WAY_10024(10024,"无权访问该资源，权限放行认证失败"),
    GATE_WAY_10025(10025,"业务服务请求数据安全处理失败"),
    GATE_WAY_10026(10026,"LICENSE中携带了无效的客户端ID"),
    GATE_WAY_10027(10027,"LICENSE中携带了无效的用户编号"),
    GATE_WAY_10028(10028,"LICENSE中携带了无效的接口编号"),
    GATE_WAY_10029(10029,"获取认证客户端的授权信息失败"),
    GATE_WAY_10030(10030,"非法请求，禁止游客模式请求"),
    GATE_WAY_10031(10031,"获取操作权限失败"),
    GATE_WAY_10032(10032,"您无权访问该资源"),
    GATE_WAY_10033(10033,"业务服务异常，请联系接口负责人排查相关问题"),
    GATE_WAY_10034(10034,"解密失败，解密结果为空"),
    GATE_WAY_10035(10035,"TOKEN解析失败，无效的TOKEN"),
    GATE_WAY_10036(10036,"TOKEN授权的登录用户和LICENSE认证的用户不一致，非法访问"),
    GATE_WAY_10037(10037,"您的账号已经在其它设备上登录"),
    GATE_WAY_10038(10038,"当前账号已经退出，请重新登录"),
    GATE_WAY_10039(10039,"LICENSE解析失败"),
    GATE_WAY_10040(10040,"权限认证异常，请稍后重试"),
    GATE_WAY_10041(10041,"REFRESH_TOKEN 过期，请重新登录"),
    GATE_WAY_10042(10042,"无效TOKEN"),GATE_WAY_10043(10043,"网关路由失败，请联系接口负责人，排查对应接口服务是否注册到注册中心或者注册中心是否存在不可用的服务节点（错误的把本地服务注册到注册中心）"),
    GATE_WAY_10044(10044,"坏的凭证"),
    GATE_WAY_10045(10045,"账号或密码错误"),
    GATE_WAY_10046(10046,"验证码错误或者过期，请输入正确有效的验证码"),
    GATE_WAY_10047(10047,"账号或密码错误"),
    GATE_WAY_10048(10048,"该账号未注册，请先注册再登录"),
    GATE_WAY_10049(10049,"您无权访问该系统"),
    GATE_WAY_10050(10050,"您的账号已被锁定"),
    GATE_WAY_10051(10051,"您访问该系统的权限已被冻结"),
    GATE_WAY_10052(10052,"验证码错误"),
    GATE_WAY_10053(10053,"未授权的客户端");

    private int code;

    private String message;

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    private ZpzOauthResultStatus(int code, String message) {
        this.code = code;
        this.message = message;
    }
}
